import java.awt.Color;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Font;
import java.awt.Insets;
import java.awt.Rectangle;
import java.awt.event.ActionEvent;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Properties;
import java.util.logging.Logger;
import javax.swing.JButton;
import javax.swing.JCheckBox;
import javax.swing.JFormattedTextField;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.JTextArea;
import org.rsbot.script.ScriptManifest;
import org.rsbot.util.GlobalConfiguration.Paths;

class WhiteBearAIOMagic$ChatResponderGUI
{
  private static final long serialVersionUID = 1L;
  private JFrame WhiteBearGUI;
  private JPanel panel1;
  private JTabbedPane tabbedPane1;
  private JPanel panel6;
  private JTextArea textArea1;
  private JTextArea textArea2;
  private JButton button2;
  private JTextArea textArea4;
  private JTextArea textArea5;
  private JButton button3;
  private JTextArea textArea6;
  private JPanel panel4;
  private JLabel label17;
  private JLabel label18;
  private JLabel label20;
  private JLabel label30;
  private JTextArea textArea3;
  private JTextArea textArea7;
  private JTextArea textArea8;
  private JTextArea textArea9;
  private JLabel label19;
  private JButton button4;
  private JCheckBox radioButton2;
  private JPanel panel3;
  private JCheckBox radioButton1;
  private JLabel label8;
  private JFormattedTextField formattedTextField1;
  private JLabel label9;
  private JFormattedTextField formattedTextField3;
  private JButton button5;
  private JLabel label21;
  private JTextArea textArea10;
  private JTextArea textArea11;
  private JLabel label22;
  private JButton button1;
  private JLabel label1;

  public boolean loadSettings()
  {
    try
    {
      WhiteBearAIOMagic.access$10500(this.this$0).load(new FileInputStream(new File(GlobalConfiguration.Paths.getSettingsDirectory(), "WhiteBearAIOMagicV2.ini")));
    }
    catch (FileNotFoundException localFileNotFoundException)
    {
      return false;
    } catch (IOException localIOException) {
      WhiteBearAIOMagic.access$18200(this.this$0).warning("[GUI] Error occurred when loading settings!");
      return false;
    }
    try {
      if (WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRuseLevelRes") != null) {
        this.radioButton2.setSelected(Boolean.parseBoolean(WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRuseLevelRes")));
      }
      if (WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRuseCustomRes") != null) {
        this.radioButton1.setSelected(Boolean.parseBoolean(WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRuseCustomRes")));
      }
      if (WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRtradeRes") != null)
        this.textArea3.setText(WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRtradeRes"));
      if (WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRgreetingRes") != null)
        this.textArea7.setText(WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRgreetingRes"));
      if (WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRbotterRes") != null)
        this.textArea8.setText(WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRbotterRes"));
      if (WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRlevelRes") != null)
        this.textArea9.setText(WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRlevelRes"));
      if (WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRdetection") != null)
        this.textArea10.setText(WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRdetection"));
      if (WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRresponse") != null) {
        this.textArea11.setText(WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRresponse"));
      }
      if (WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRcustomTO") != null) {
        this.formattedTextField1.setText(WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRcustomTO"));
      }
      if (WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRcustomTOR") != null)
        this.formattedTextField3.setText(WhiteBearAIOMagic.access$10500(this.this$0).getProperty("CRcustomTOR"));
    }
    catch (Exception localException) {
      WhiteBearAIOMagic.access$18300(this.this$0).warning("[GUI] Settings file is corrupt, using default settings!");
    }
    return true;
  }

  private WhiteBearAIOMagic$ChatResponderGUI(WhiteBearAIOMagic paramWhiteBearAIOMagic) {
    initComponentx();
  }

  private void button1ActionPerformed(ActionEvent paramActionEvent) {
    try {
      this.this$0.chatRes.tradeRes = this.textArea3.getText().toLowerCase().split("/");
      this.this$0.chatRes.greetingRes = this.textArea7.getText().toLowerCase().split("/");

      this.this$0.chatRes.botterRes = this.textArea8.getText().toLowerCase().split("/");

      this.this$0.chatRes.levelRes = this.textArea9.getText().toLowerCase().split("/");
      this.this$0.chatRes.customDetect = this.textArea10.getText().toLowerCase().split("/");

      this.this$0.chatRes.customRes = this.textArea11.getText().toLowerCase().split("/");

      this.this$0.chatRes.doLevelRes = this.radioButton2.isSelected();
      this.this$0.chatRes.doCustomRes = this.radioButton1.isSelected();
      this.this$0.chatRes.customTO = Integer.parseInt(this.formattedTextField1.getText());

      this.this$0.chatRes.customTOR = Integer.parseInt(this.formattedTextField3.getText());

      WhiteBearAIOMagic.access$10500(this.this$0).setProperty("CRuseLevelRes", String.valueOf(this.radioButton2.isSelected()));

      WhiteBearAIOMagic.access$10500(this.this$0).setProperty("CRuseCustomRes", String.valueOf(this.radioButton1.isSelected()));

      WhiteBearAIOMagic.access$10500(this.this$0).setProperty("CRtradeRes", this.textArea3.getText());
      WhiteBearAIOMagic.access$10500(this.this$0).setProperty("CRgreetingRes", this.textArea7.getText());
      WhiteBearAIOMagic.access$10500(this.this$0).setProperty("CRbotterRes", this.textArea8.getText());
      WhiteBearAIOMagic.access$10500(this.this$0).setProperty("CRlevelRes", this.textArea9.getText());
      WhiteBearAIOMagic.access$10500(this.this$0).setProperty("CRdetection", this.textArea10.getText());
      WhiteBearAIOMagic.access$10500(this.this$0).setProperty("CRresponse", this.textArea11.getText());
      WhiteBearAIOMagic.access$10500(this.this$0).setProperty("CRcustomTO", this.formattedTextField1.getText());
      WhiteBearAIOMagic.access$10500(this.this$0).setProperty("CRcustomTOR", this.formattedTextField3.getText());
      try {
        WhiteBearAIOMagic.access$10500(this.this$0).store(new FileWriter(new File(GlobalConfiguration.Paths.getSettingsDirectory(), "WhiteBearAIOMagicV2.ini")), "The GUI Settings for White Bear AIO Magic (Version: " + Double.toString(this.this$0.properties.version()) + ")");
      }
      catch (IOException localIOException)
      {
        WhiteBearAIOMagic.access$18400(this.this$0).warning("[GUI] Error occurred when saving GUI settings!");
      }
      WhiteBearAIOMagic.access$14302(this.this$0, false);
      this.WhiteBearGUI.dispose();
    } catch (Exception localException) {
      WhiteBearAIOMagic.access$18500(this.this$0).severe("Error occurred when saving GUI options.");
    }
  }

  private void button2ActionPerformed(ActionEvent paramActionEvent) {
    this.tabbedPane1.setSelectedIndex(1);
  }

  private void button3ActionPerformed(ActionEvent paramActionEvent) {
    this.tabbedPane1.setSelectedIndex(2);
  }

  private void back1ActionPerformed(ActionEvent paramActionEvent) {
    this.tabbedPane1.setSelectedIndex(0);
  }

  private void back2ActionPerformed(ActionEvent paramActionEvent) {
    this.tabbedPane1.setSelectedIndex(0);
  }

  private void initComponentx() {
    this.WhiteBearGUI = new JFrame();
    this.panel1 = new JPanel();
    this.tabbedPane1 = new JTabbedPane();
    this.panel6 = new JPanel();
    this.textArea1 = new JTextArea();
    this.textArea2 = new JTextArea();
    this.button2 = new JButton();
    this.textArea4 = new JTextArea();
    this.textArea5 = new JTextArea();
    this.button3 = new JButton();
    this.textArea6 = new JTextArea();
    this.panel4 = new JPanel();
    this.label17 = new JLabel();
    this.label18 = new JLabel();
    this.label20 = new JLabel();
    this.label30 = new JLabel();
    this.textArea3 = new JTextArea();
    this.textArea7 = new JTextArea();
    this.textArea8 = new JTextArea();
    this.textArea9 = new JTextArea();
    this.label19 = new JLabel();
    this.button4 = new JButton();
    this.radioButton2 = new JCheckBox();
    this.panel3 = new JPanel();
    this.radioButton1 = new JCheckBox();
    this.label8 = new JLabel();
    this.formattedTextField1 = new JFormattedTextField();
    this.label9 = new JLabel();
    this.formattedTextField3 = new JFormattedTextField();
    this.button5 = new JButton();
    this.label21 = new JLabel();
    this.textArea10 = new JTextArea();
    this.textArea11 = new JTextArea();
    this.label22 = new JLabel();
    this.button1 = new JButton();
    this.label1 = new JLabel();

    this.WhiteBearGUI.setAlwaysOnTop(true);
    this.WhiteBearGUI.setBackground(Color.black);
    this.WhiteBearGUI.setResizable(false);
    this.WhiteBearGUI.setMinimumSize(new Dimension(405, 405));
    this.WhiteBearGUI.setTitle("White Bear AIO Magic");
    this.WhiteBearGUI.setDefaultCloseOperation(0);

    this.WhiteBearGUI.setFont(new Font("Century Gothic", 0, 12));

    Container localContainer = this.WhiteBearGUI.getContentPane();

    localContainer.setLayout(null);

    this.panel1.setBackground(Color.black);
    this.panel1.setForeground(Color.green);
    this.panel1.setMinimumSize(new Dimension(100, 200));
    this.panel1.setLayout(null);

    this.tabbedPane1.setFont(new Font("Century Gothic", 0, 12));

    this.tabbedPane1.setForeground(new Color(0, 153, 0));
    this.tabbedPane1.setEnabled(false);

    this.panel6.setBackground(Color.black);
    this.panel6.setLayout(null);

    this.textArea1.setText(" This GUI allows you to change Chat Responder\nsettings. Just click start if you do not know what\nto do.");

    this.textArea1.setLineWrap(true);
    this.textArea1.setFont(new Font("Century Gothic", 0, 14));

    this.textArea1.setTabSize(0);
    this.textArea1.setBackground(Color.black);
    this.textArea1.setForeground(new Color(204, 255, 0));
    this.textArea1.setEditable(false);
    this.textArea1.setBorder(null);
    this.textArea1.setOpaque(false);
    this.textArea1.setRequestFocusEnabled(false);
    this.textArea1.setFocusable(false);
    this.panel6.add(this.textArea1);
    this.textArea1.setBounds(20, 10, 330, 60);

    this.textArea2.setText(" For responses, separate each response with /\nE.g. For hi/hello/yes?, the possible responses\nare hi, hello and yes?. When the bot needs to\nrespond, it will randomly pick one response");

    this.textArea2.setLineWrap(true);
    this.textArea2.setFont(new Font("Century Gothic", 0, 14));

    this.textArea2.setTabSize(0);
    this.textArea2.setBackground(Color.black);
    this.textArea2.setForeground(new Color(204, 255, 0));
    this.textArea2.setEditable(false);
    this.textArea2.setBorder(null);
    this.textArea2.setOpaque(false);
    this.textArea2.setRequestFocusEnabled(false);
    this.textArea2.setFocusable(false);
    this.panel6.add(this.textArea2);
    this.textArea2.setBounds(20, 80, 330, 78);

    this.button2.setText("Customize Responses");
    this.button2.setBackground(Color.black);
    this.button2.setFont(new Font("Century Gothic", 1, 12));

    this.button2.setForeground(new Color(0, 102, 51));
    this.button2.addActionListener(new WhiteBearAIOMagic.ChatResponderGUI.1(this));

    this.panel6.add(this.button2);
    this.button2.setBounds(190, 157, 160, 23);

    this.textArea4.setText("and use it.");
    this.textArea4.setLineWrap(true);
    this.textArea4.setFont(new Font("Century Gothic", 0, 14));

    this.textArea4.setTabSize(0);
    this.textArea4.setBackground(Color.black);
    this.textArea4.setForeground(new Color(204, 255, 0));
    this.textArea4.setEditable(false);
    this.textArea4.setBorder(null);
    this.textArea4.setOpaque(false);
    this.textArea4.setRequestFocusEnabled(false);
    this.textArea4.setFocusable(false);
    this.panel6.add(this.textArea4);
    this.textArea4.setBounds(20, 156, 85, 20);

    this.textArea5.setText(" You can also set a custom detection, reply");

    this.textArea5.setLineWrap(true);
    this.textArea5.setFont(new Font("Century Gothic", 0, 14));

    this.textArea5.setTabSize(0);
    this.textArea5.setBackground(Color.black);
    this.textArea5.setForeground(new Color(204, 255, 0));
    this.textArea5.setEditable(false);
    this.textArea5.setBorder(null);
    this.textArea5.setOpaque(false);
    this.textArea5.setRequestFocusEnabled(false);
    this.textArea5.setFocusable(false);
    this.panel6.add(this.textArea5);
    this.textArea5.setBounds(20, 190, 330, 20);

    this.button3.setText("Custom detection");
    this.button3.setBackground(Color.black);
    this.button3.setFont(new Font("Century Gothic", 1, 12));

    this.button3.setForeground(new Color(0, 102, 51));
    this.button3.addActionListener(new WhiteBearAIOMagic.ChatResponderGUI.2(this));

    this.panel6.add(this.button3);
    this.button3.setBounds(210, 207, 140, 23);

    this.textArea6.setText("and timeout.");
    this.textArea6.setLineWrap(true);
    this.textArea6.setFont(new Font("Century Gothic", 0, 14));

    this.textArea6.setTabSize(0);
    this.textArea6.setBackground(Color.black);
    this.textArea6.setForeground(new Color(204, 255, 0));
    this.textArea6.setEditable(false);
    this.textArea6.setBorder(null);
    this.textArea6.setOpaque(false);
    this.textArea6.setRequestFocusEnabled(false);
    this.textArea6.setFocusable(false);
    this.panel6.add(this.textArea6);
    this.textArea6.setBounds(20, 209, 100, 20);

    Dimension localDimension = new Dimension();
    Rectangle localRectangle;
    for (int i = 0; i < this.panel6.getComponentCount(); i++) {
      localRectangle = this.panel6.getComponent(i).getBounds();

      localDimension.width = Math.max(localRectangle.x + localRectangle.width, localDimension.width);

      localDimension.height = Math.max(localRectangle.y + localRectangle.height, localDimension.height);
    }

    Insets localInsets1 = this.panel6.getInsets();
    localDimension.width += localInsets1.right;
    localDimension.height += localInsets1.bottom;
    this.panel6.setMinimumSize(localDimension);
    this.panel6.setPreferredSize(localDimension);

    this.tabbedPane1.addTab("Info", this.panel6);

    this.panel4.setBackground(Color.black);
    this.panel4.setLayout(null);

    this.label17.setText("Trade Response");
    this.label17.setBackground(new Color(51, 51, 51));
    this.label17.setForeground(new Color(255, 255, 102));
    this.label17.setFont(new Font("Century Gothic", 1, 12));

    this.label17.setHorizontalAlignment(2);
    this.panel4.add(this.label17);
    this.label17.setBounds(5, 15, 110, 20);

    this.label18.setText("Greeting Response");
    this.label18.setBackground(new Color(51, 51, 51));
    this.label18.setForeground(new Color(255, 255, 102));
    this.label18.setFont(new Font("Century Gothic", 1, 12));

    this.label18.setHorizontalAlignment(2);
    this.panel4.add(this.label18);
    this.label18.setBounds(5, 65, 120, 20);

    this.label20.setText("Botter! Response");
    this.label20.setBackground(new Color(51, 51, 51));
    this.label20.setForeground(new Color(255, 255, 102));
    this.label20.setFont(new Font("Century Gothic", 1, 12));

    this.panel4.add(this.label20);
    this.label20.setBounds(5, 115, 115, 20);

    this.label30.setText("Level up (yourself)");
    this.label30.setBackground(new Color(51, 51, 51));
    this.label30.setForeground(new Color(255, 255, 102));
    this.label30.setFont(new Font("Century Gothic", 1, 12));

    this.panel4.add(this.label30);
    this.label30.setBounds(5, 165, 115, 20);

    this.textArea3.setForeground(new Color(255, 255, 204));
    this.textArea3.setBackground(Color.gray);
    this.textArea3.setText("no thanks/no thx/nope/im fine");
    this.textArea3.setFont(new Font("Century Gothic", 0, 12));

    this.textArea3.setLineWrap(true);
    this.panel4.add(this.textArea3);
    this.textArea3.setBounds(130, 15, 225, 37);

    this.textArea7.setForeground(new Color(255, 255, 204));
    this.textArea7.setBackground(Color.gray);
    this.textArea7.setText("hi!/hi./hi/hello/hello!/hello./hello../yo/yo!/yes?/what/what?/hey!");

    this.textArea7.setFont(new Font("Century Gothic", 0, 12));

    this.textArea7.setLineWrap(true);
    this.panel4.add(this.textArea7);
    this.textArea7.setBounds(130, 65, 225, 37);

    this.textArea8.setForeground(new Color(255, 255, 204));
    this.textArea8.setBackground(Color.gray);
    this.textArea8.setText("huh/zzz/.../???/?????/what/what?/no/nop/nope");

    this.textArea8.setFont(new Font("Century Gothic", 0, 12));

    this.textArea8.setLineWrap(true);
    this.panel4.add(this.textArea8);
    this.textArea8.setBounds(130, 115, 225, 37);

    this.textArea9.setForeground(new Color(255, 255, 204));
    this.textArea9.setBackground(Color.gray);
    this.textArea9.setText("yay/haha/:)/yay!/yay!!!/finally...");

    this.textArea9.setFont(new Font("Century Gothic", 0, 12));

    this.textArea9.setLineWrap(true);
    this.panel4.add(this.textArea9);
    this.textArea9.setBounds(130, 165, 225, 37);

    this.label19.setText("(70% chance to talk)");
    this.label19.setBackground(new Color(51, 51, 51));
    this.label19.setForeground(new Color(255, 255, 102));
    this.label19.setFont(new Font("Century Gothic", 1, 12));

    this.panel4.add(this.label19);
    this.label19.setBounds(4, 182, 130, 20);

    this.button4.setText("Back");
    this.button4.setBackground(Color.black);
    this.button4.setFont(new Font("Century Gothic", 1, 12));

    this.button4.setForeground(new Color(0, 102, 51));
    this.button4.addActionListener(new WhiteBearAIOMagic.ChatResponderGUI.3(this));

    this.panel4.add(this.button4);
    this.button4.setBounds(285, 215, 70, 23);

    this.radioButton2.setText("Use Level up Response");
    this.radioButton2.setBackground(Color.black);
    this.radioButton2.setForeground(Color.yellow);
    this.radioButton2.setFont(new Font("Century Gothic", 1, 13));

    this.panel4.add(this.radioButton2);
    this.radioButton2.setBounds(10, 210, 183, 25);

    localDimension = new Dimension();
    for (int j = 0; j < this.panel4.getComponentCount(); j++) {
      localRectangle = this.panel4.getComponent(j).getBounds();

      localDimension.width = Math.max(localRectangle.x + localRectangle.width, localDimension.width);

      localDimension.height = Math.max(localRectangle.y + localRectangle.height, localDimension.height);
    }

    Insets localInsets2 = this.panel4.getInsets();
    localDimension.width += localInsets2.right;
    localDimension.height += localInsets2.bottom;
    this.panel4.setMinimumSize(localDimension);
    this.panel4.setPreferredSize(localDimension);

    this.tabbedPane1.addTab("Responses", this.panel4);

    this.panel3.setBackground(Color.black);
    this.panel3.setLayout(null);

    this.radioButton1.setText("Use Custom Detection");
    this.radioButton1.setBackground(Color.black);
    this.radioButton1.setForeground(Color.yellow);
    this.radioButton1.setFont(new Font("Century Gothic", 1, 13));

    this.panel3.add(this.radioButton1);
    this.radioButton1.setBounds(17, 15, 183, 25);

    this.label8.setText("Timeout (seconds):");
    this.label8.setBackground(new Color(51, 51, 51));
    this.label8.setForeground(new Color(255, 255, 102));
    this.label8.setFont(new Font("Century Gothic", 1, 12));

    this.panel3.add(this.label8);
    this.label8.setBounds(25, 160, 125, 20);

    this.formattedTextField1.setFont(new Font("Century Gothic", 0, 12));

    this.formattedTextField1.setForeground(new Color(255, 255, 204));

    this.formattedTextField1.setBackground(Color.gray);
    this.formattedTextField1.setText("160");
    this.panel3.add(this.formattedTextField1);
    this.formattedTextField1.setBounds(155, 160, 70, 23);

    this.label9.setText("±");
    this.label9.setBackground(new Color(51, 51, 51));
    this.label9.setForeground(new Color(255, 255, 102));
    this.label9.setFont(new Font("Century Gothic", 1, 12));

    this.panel3.add(this.label9);
    this.label9.setBounds(230, 160, 15, 20);

    this.formattedTextField3.setFont(new Font("Century Gothic", 0, 12));

    this.formattedTextField3.setForeground(new Color(255, 255, 204));

    this.formattedTextField3.setBackground(Color.gray);
    this.formattedTextField3.setText("30");
    this.panel3.add(this.formattedTextField3);
    this.formattedTextField3.setBounds(245, 160, 59, 23);

    this.button5.setText("Back");
    this.button5.setBackground(Color.black);
    this.button5.setFont(new Font("Century Gothic", 1, 12));

    this.button5.setForeground(new Color(0, 102, 51));
    this.button5.addActionListener(new WhiteBearAIOMagic.ChatResponderGUI.4(this));

    this.panel3.add(this.button5);
    this.button5.setBounds(285, 215, 70, 23);

    this.label21.setText("Detect:");
    this.label21.setBackground(new Color(51, 51, 51));
    this.label21.setForeground(new Color(255, 255, 102));
    this.label21.setFont(new Font("Century Gothic", 1, 12));

    this.label21.setHorizontalAlignment(2);
    this.panel3.add(this.label21);
    this.label21.setBounds(25, 50, 55, 20);

    this.textArea10.setForeground(new Color(255, 255, 204));
    this.textArea10.setBackground(Color.gray);
    this.textArea10.setText("i love u/i luv u/i love you/i luv you/i lov u/i love you");

    this.textArea10.setFont(new Font("Century Gothic", 0, 12));

    this.textArea10.setLineWrap(true);
    this.panel3.add(this.textArea10);
    this.textArea10.setBounds(95, 50, 235, 37);

    this.textArea11.setForeground(new Color(255, 255, 204));
    this.textArea11.setBackground(Color.gray);
    this.textArea11.setText("yuck/yuk/gross/eww/zzz/.../zzzz/....");

    this.textArea11.setFont(new Font("Century Gothic", 0, 12));

    this.textArea11.setLineWrap(true);
    this.panel3.add(this.textArea11);
    this.textArea11.setBounds(95, 100, 235, 37);

    this.label22.setText("Respond:");
    this.label22.setBackground(new Color(51, 51, 51));
    this.label22.setForeground(new Color(255, 255, 102));
    this.label22.setFont(new Font("Century Gothic", 1, 12));

    this.label22.setHorizontalAlignment(2);
    this.panel3.add(this.label22);
    this.label22.setBounds(25, 100, 65, 20);

    localDimension = new Dimension();
    for (int k = 0; k < this.panel3.getComponentCount(); k++) {
      localRectangle = this.panel3.getComponent(k).getBounds();

      localDimension.width = Math.max(localRectangle.x + localRectangle.width, localDimension.width);

      localDimension.height = Math.max(localRectangle.y + localRectangle.height, localDimension.height);
    }

    Insets localInsets3 = this.panel3.getInsets();
    localDimension.width += localInsets3.right;
    localDimension.height += localInsets3.bottom;
    this.panel3.setMinimumSize(localDimension);
    this.panel3.setPreferredSize(localDimension);

    this.tabbedPane1.addTab("Custom", this.panel3);

    this.panel1.add(this.tabbedPane1);
    this.tabbedPane1.setBounds(15, 45, 370, 275);

    this.button1.setText("Complete Customization");
    this.button1.setBackground(Color.black);
    this.button1.setFont(new Font("Century Gothic", 1, 18));
    this.button1.setForeground(new Color(0, 102, 51));
    this.button1.addActionListener(new WhiteBearAIOMagic.ChatResponderGUI.5(this));

    this.panel1.add(this.button1);
    this.button1.setBounds(25, 325, 350, 55);

    this.label1.setText("Chat Responder Customization");
    this.label1.setBackground(new Color(51, 51, 51));
    this.label1.setForeground(new Color(153, 255, 153));
    this.label1.setFont(new Font("Century Gothic", 1, 20));
    this.panel1.add(this.label1);
    this.label1.setBounds(50, 5, 315, 40);

    localDimension = new Dimension();
    for (int m = 0; m < this.panel1.getComponentCount(); m++) {
      localRectangle = this.panel1.getComponent(m).getBounds();

      localDimension.width = Math.max(localRectangle.x + localRectangle.width, localDimension.width);

      localDimension.height = Math.max(localRectangle.y + localRectangle.height, localDimension.height);
    }

    Insets localInsets4 = this.panel1.getInsets();
    localDimension.width += localInsets4.right;
    localDimension.height += localInsets4.bottom;
    this.panel1.setMinimumSize(localDimension);
    this.panel1.setPreferredSize(localDimension);

    localContainer.add(this.panel1);
    this.panel1.setBounds(0, 0, 400, 395);

    localContainer.setPreferredSize(new Dimension(405, 420));

    this.WhiteBearGUI.setSize(405, 420);
    this.WhiteBearGUI.setLocationRelativeTo(this.WhiteBearGUI.getOwner());
    loadSettings();
  }
}